﻿/*
 * Microsoft .NET  2.0+ version of Sphinx searchd client (Sphinx API)
 * 
 * Copyright (c) 2009, Shaun Berryman
 * All rights reserved
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License. You should have
 * received a copy of the GPL license along with this program; if you
 * did not, you can find it at http://www.gnu.org/
 */

using System;

namespace SphinxSearchApi
{
    /// <summary>
    /// Available commands for the sphinxd service
    /// </summary>
    public enum CommandEnum : short
    {
        /// <summary>
        /// Pretty much the reason you are using this API
        /// </summary>
        Search = 0,

        /// <summary>
        /// Excerpts (snippets) builder function. Connects to searchd, asks it to generate excerpts 
        /// (snippets) from given documents, and returns the results.
        /// </summary>
        Excerpt = 1,

        /// <summary>
        /// Instantly updates given attribute values in given documents. Returns number of actually 
        /// updated documents (0 or more) on success, or -1 on failure.
        /// </summary>
        Update = 2,

        /// <summary>
        /// Extracts keywords from query using tokenizer settings for given index, optionally with per-keyword 
        /// occurrence statistics. Returns an array of hashes with per-keyword information.
        /// </summary>
        Keywords = 3,

        /// <summary>
        /// Persistent connections allow to use single network connection to run multiple commands that would otherwise require reconnects.
        /// </summary>
        Persist = 4,

        /// <summary>
        /// Queries searchd status, and returns an array of status variable name and value pairs. 
        /// </summary>
        Status = 5,

        /// <summary>
        /// Depreciated?
        /// </summary>
        Query = 6,

        /// <summary>
        /// Force attribute flush, and block until it completes.
        /// </summary>
        FlushAttributes = 7
    }
}
